:root {
    box-sizing: border-box;
}
*,
::after,
::before {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 20px;
    width: 100%;
    height: 100vh;
}
main {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.msgbox {
    width: 100%;
    height: 78%;
    background-color: aliceblue;
    border: 1px solid red;
    padding: 10px;
    overflow: hidden;
}
.msg {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;


}
.msg section {
    flex: 1;
    position: relative;
    background: #ccccff;
    border-radius: 5px;
    padding: 8px;

}
.msg section::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 14px;
    left: -11px;
    border: 6px solid transparent;
    border-right-color: #ccf;
}
.left section{
    margin-left: 18px;
}
.right section {
    margin-right: 18px;
}
.right section::after {
    left: auto;
    right: -11px;
    border-right-color: transparent;
    border-left-color: #ccccff;
}
.tips {
    position: fixed;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 6px 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    display: none;
}
textarea {
    height: 20%;
    resize: none;
    outline: none;
    padding: 10px;
    border: 1px solid pink;
}
